package com.wanyangproject.androidlearning.designMode.proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class BirdDynamic implements InvocationHandler {

    private Object proxyObject;

    public BirdDynamic(Object proxyObject) {
        this.proxyObject = proxyObject;
    }

    @Override
    public Object invoke(Object o, Method method, Object[] objects) throws Throwable {
        System.out.println("代理类："+o.getClass().getSimpleName());
        System.out.println("bird dynamic proxy...");
        method.invoke(proxyObject,objects);
        System.out.println("结束。。。");
        return null;
    }
}
